package com.easyExcel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;

import java.util.Date;


@HeadRowHeight(30) // 标题行高
@ColumnWidth(30) // 列宽
@ContentRowHeight(20) // 内容行高
public class User {

    private static final long serialVersionUID = -6849794470754667710L;

    @ExcelProperty(value = "名称")
    private String name;
    @ExcelProperty(value = "手机号")
    private String phone;
    @ExcelProperty(value = "年龄")
    private Integer age;
    @ColumnWidth(50) // 列宽
    @ExcelProperty(value = "生日")
    private Date brith;
    @ExcelProperty(value = "概率")
    private String probability;
    @ExcelProperty(value = "状态")
    private Integer state;

    public User() {
    }

    public User(String name) {
        this.name = name;
    }

    public User(String name, String phone, Integer age, Date brith, String probability, Integer state) {
        this.name = name;
        this.phone = phone;
        this.age = age;
        this.brith = brith;
        this.probability = probability;
        this.state = state;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBrith() {
        return brith;
    }

    public void setBrith(Date brith) {
        this.brith = brith;
    }

    public String getProbability() {
        return probability;
    }

    public void setProbability(String probability) {
        this.probability = probability;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", age=" + age +
                ", brith=" + brith +
                ", probability='" + probability + '\'' +
                ", state=" + state +
                '}';
    }
}
